package com.sz.youban.dt.service.allinpay;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.sz.youban.dt.entity.allinpay.DtPayRecords;
import com.sz.youban.dt.interfs.allinpay.IDtPayRecordsService;
import com.sz.youban.dt.service.allinpay.mapper.DtPayRecordsMapper;

/**
 * <p>
 * 支付记录 服务实现类
 * </p>
 *
 * @author liyang
 * @since 2017-06-13
 */
@Service
public class DtPayRecordsServiceImpl extends ServiceImpl<DtPayRecordsMapper, DtPayRecords> implements IDtPayRecordsService {


    @Autowired
    private DtPayRecordsMapper payRecordsMapper;


    @Override
    public int saveReceiveAndPayRecord(DtPayRecords payRecords) {
        return payRecordsMapper.insert(payRecords);
    }

    @Override
    public int changePayRecordStatus(String dealNo, int status, String desc, String settleDay) {
        return payRecordsMapper.updateStatusByDealNo(dealNo,  status,  desc, settleDay);
    }

    @Override
    public DtPayRecords getRecordsByOrderNo(String orderNo) {
        return payRecordsMapper.getRecordsByOrderNo(orderNo);
    }

}
